import 'package:flutter/material.dart';
import 'package:get/get.dart';

class Bottom6Controller extends GetxController {
  //TODO: Implement Bottom6Controller

  final count = 0.obs;

  FloatingActionButtonLocation location =
      FloatingActionButtonLocation.startDocked;

  RxInt pageIndex = 0.obs;

  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    super.onClose();
  }

  void increment() => count.value++;

  void onClickBottomBar(int page) {
    pageIndex.value = page;
  }

  void setLocation() {

    print(location);

    if (location == FloatingActionButtonLocation.startDocked) {
      location = FloatingActionButtonLocation.centerDocked;
    } else if (location == FloatingActionButtonLocation.centerDocked) {
      location = FloatingActionButtonLocation.endContained;
    } else {
      location = FloatingActionButtonLocation.startDocked;
    }
    update();
  }
}
